import logging
from BeautifulReport import BeautifulReport
import HTMLTestRunner_PY3
import unittest

class Tools():

    def report(self):
        suite=unittest.defaultTestLoader.discover(start_dir='D:\python pojects\Daywu\yuekao\Po\Report\yk.html',pattern='TestCase.py')
        BeautifulReport(suite).report(filename='yk.html',description='360商城测试报告')

    def log(self):
        logging.basicConfig(filename='D:\python pojects\Daywu\yuekao\Po\Log\yk.Log',
                            filemode='a+',
                            level=logging.DEBUG,
                            format='%(levelname)s-%(message)s->%(asctime)s->')
    # def report(self):
    #     report=HTMLTestRunner_PY3.HTMLTestRunner(open('D:\python pojects\Daywu\yuekao\Po\Report\yk.html'),
    #                                       title='测试报告',
    #                                       description='11')
    #     return report

